// @FileName  :sets.c
// @Time      :2024/2/29 20:15
// @Author    :YKW
//# include <bits/stdc++.h>
//using namespace std;
# include <stdio.h>
# include <stdlib.h>
# include <math.h>
# include <string.h>
# include <stdlib.h>

void solve() {
    int a[100], b[100], cnta = 0, cntb = 0;
    while ((scanf("%d", &a[cnta]))) { if (a[cnta++] == -1) break; }
    while ((scanf("%d", &b[cntb]))) { if (b[cntb++] == -1) break; }
    for (int i = 0; i < cnta; i++) {
        int f = 1;
        for (int j = 0; j < cntb; j++)
            if (a[i] == b[j])
                f = 0;
        if (f == 1)printf("%d ", a[i]);
    }
}

void main() {
    int t = 1;
    //scanf("%d", &t);
    while (t--) solve();
    return 0;
}